package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"week1_zg6/orderapi/internal/config"
	"week1_zg6/orderrpc/orderclient"
)

type ServiceContext struct {
	Config config.Config
	Order  orderclient.Order
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		Order:  orderclient.NewOrder(zrpc.MustNewClient(c.Order)),
	}
}
